<!--[*
// ----------------------------------------------------------------------
// Source file:  $Source: /cvsroot/pn-commerce/pn-commerce/pntemplates/pncommerce_user_categoryview.html,v $
//
// Last changes from:  $Author: landseer $
//
// Revision:           $Revision: 1.35 $
//
// Date of revision    $Date: 2005/03/22 13:03:40 $
//
// ----------------------------------------------------------------------
//
// called from: pncommerce_user_categoryview or the categoryview block
// task: show the items and subcategories in the recent category
//       this is one of the mst complex functions/templates because of all the options it
//       has to offer. Be careful when editing this!
*]-->

<!--[ include file='zCart_user_commonHeader.html' ]-->
<!-- start zCart_user_categoryview -->
<!--[ pncGetConfigThumbnail ]-->

<!--[* pndebug *]-->

<table width='100%'>
    <tr width='100%'>
        <td width='50%' align='left'>
            <!--[ if $CategoryID ]-->
            <!--[ pnml name='_PNC_YOUAREHERE' ]--> <!--[ pncCategoryPath category_id=$CategoryID ]-->
            <!--[ /if ]-->
        </td>
        <td width='50%' align='right'>
            <!--[ if $Category.ImageTN<>false ]-->
                <img src='<!--[ $Category.ImageTN ]-->' border='0' alt=''>
            <!--[ else ]-->
                <!--[ if $shopConfigThumbnail.UseImageReplacements == on ]-->
                    <!--[ pnimg src=$shopConfigThumbnail.CategoryImageTNReplacement border=0 ]-->
                <!--[ /if ]-->
            <!--[ /if ]-->
        </td>
    </tr>
    <tr width='100%'>
        <td colspan='2' align='left'>
            <!--[ if $CategoryCount > 0 ]-->
                <!--[ pnml name='_PNC_SUBCATEGORIES' ]--><br>
                <!--[ foreach item=Category from=$CategoryList ]-->
                &lt; <a href="<!--[ $Category.URL ]-->"><!--[ $Category.Name ]--></a> &gt;<br>
                <!--[ /foreach ]-->
            <!--[ /if ]-->
        </td>
    </tr>
    <tr width='100%'>
        <td width='50%' align='left'>&nbsp;

        </td>
        <td width='50%' align='right'>
            <!--[ pncItemsPerPageSelector ItemsPerPage=$ItemsPerPage CategoryID=$CategoryID ]-->
        </td>
    </tr>
    <tr>
        <td colspan='2' align='right'>
            <!--[ pncItemsPager total=$TotalItems perpage=$ItemsPerPage startnum=$FirstItem ]-->
        </td>
    </tr>
    <tr>
        <td colspan='2' align='center'>
            <br>
            <b><!--[ pnml name='_PNC_SELECTITEM' html=1 ]--></b>
        </td>
    </tr>
</table>
<br>

<!--[ if $ItemCount > 0 ]-->
<!--[ if $SubItems<>false ]-->
<table width='100%'>
<tr>
        <td colspan='2' align='center'>
            <br>
            <b><!--[ pnml name='_PNC_SUBITEMSONLY' html=1 ]--></b>
        </td>
    </tr>
</table>
<br>
<!--[ /if ]-->
<table width='100%' cellpadding='0'>
    <tr bgcolor='#eeeeee'>
        <th>&nbsp;

        </th>
        <th>
            <!--[ pnml name='_PNC_ITEMSKU' ]-->
            <!--[ pncColumnSort SortBy=ItemSKU ]-->
        </th>
        <th>
            <!--[ pnml name='_PNC_ITEMNAME' ]-->
            <!--[ pncColumnSort SortBy=ItemName ]-->
        </th>
        <th>
            <!--[ pnml name='_PNC_PRICE' ]-->
            <!--[ pncColumnSort SortBy=ItemCost ]-->
        </th>
        <th>&nbsp;

        </th>
    </tr>
    <!--[ foreach item=Item from=$ItemList ]-->
    <tr>
        <td>
            <!--[if $Item.ImageTN neq false]-->
                <a href="<!--[ pncItemDetailsLinkUrl ItemID=$Item.ID ]-->"><img src='<!--[$Item.ImageTN ]-->' border='0' alt='<!--[ $Item.Name ]-->'></a>
            <!--[ else ]-->
                <!--[ if $shopConfigThumbnail.UseImageReplacements == on ]-->
                    <!--[ pnimg src=$shopConfigThumbnail.ItemImageTNReplacement border=0 ]-->
                <!--[ /if ]-->
            <!--[/if]-->
        </td>
        <td>
            <!--[ $Item.SKU ]-->
        </td>
        <td>
            <a href="<!--[ pncItemDetailsLinkUrl ItemID=$Item.ID ]-->"><!--[ $Item.Name ]--></a>
        </td>
        <td>
            <!--[ $Item.CostLong|pncShowAsPrice]-->
        </td>
        <td>
            <!--[ if ($Item.Quantity - $Item.OrderedQuantity > 0) or ($Item.IgnoreQuantity==on) ]-->
            <!--[ pncAddItem ItemID=$Item.ID]-->
            <!--[ else ]-->
            <!--[ pnml name='_PNC_OUTOFSTOCK' ]-->.
            <!--[ /if ]-->
        </td>
    </tr>
    <!--[ /foreach ]-->
</table>

<!--[ else ]-->

<p align='center'><!--[ pnml name='_PNC_NOITEMS' html=1 ]--></p>

<!--[ /if ]-->

<!-- end zCart_user_defaultCategory -->
<!--[ include file='zCart_user_commonFooter.html' ]-->